<div class="content-warp">
  <div class="content-header">
    <i class="anticon anticon-left-circle-o" routerLink="../../list"></i>
    <span class="content-title">修改地址</span>
  </div>
  <div class="content-body">
    <nz-spin [nzSpinning]="_isSpinning">
      <form nz-form [formGroup]="validateForm" (ngSubmit)="_submitForm()">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24">订单编号:</div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24">{{order_no}}</div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24">收件人:</div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24" [nzValidateStatus]="getFormControl('name')">
            <nz-input [nzSize]="'large'" formControlName="name"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('name').dirty&&getFormControl('name').hasError('required')">请输入收件人</div>
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24">联系电话:</div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24" [nzValidateStatus]="getFormControl('mobile')">
            <nz-input [nzSize]="'large'" formControlName="mobile"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('mobile').dirty&&getFormControl('mobile').hasError('required')">请输入联系电话</div>
            <div nz-form-explain *ngIf="getFormControl('mobile').dirty&&getFormControl('mobile').hasError('mobile')">请输入正确的手机号码</div>
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24">收货地址:</div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24" [nzValidateStatus]="getFormControl('district')">
            <div nz-form-control style="height: 35px;">
              <div nz-col [nzSpan]="8" style="padding-right: 5px">
                <div nz-form-item nz-row>
                  <nz-select
                    nzAllowClear
                    [nzSize]="'large'"
                    [nzPlaceHolder]="'省'"
                    [nzFilter]="true"
                    formControlName="Province"
                    [nzNotFoundContent]="'无法找到'"
                    nzShowSearch>
                    <nz-option
                      *ngFor="let option of provinceOptions"
                      [nzLabel]="option.name"
                      [nzValue]="option.name">
                    </nz-option>
                  </nz-select>
                </div>
              </div>
              <div nz-col [nzSpan]="8" style="padding-right: 5px">
                <div nz-form-item nz-row>
                  <nz-select
                    [nzDisabled]="!hadGeCityList"
                    nzAllowClear
                    [nzSize]="'large'"
                    [nzPlaceHolder]="'市'"
                    [nzFilter]="true"
                    formControlName="City"
                    [nzNotFoundContent]="'无法找到'"
                    nzShowSearch>
                    <nz-option
                      *ngFor="let option of cityOptions"
                      [nzLabel]="option.name"
                      [nzValue]="option.name">
                    </nz-option>
                  </nz-select>
                </div>
              </div>
              <div nz-col [nzSpan]="8">
                <div nz-form-item nz-row>
                  <nz-select
                    [nzDisabled]="!hadGetRegionList"
                    nzAllowClear
                    [nzSize]="'large'"
                    [nzPlaceHolder]="'区'"
                    [nzFilter]="true"
                    formControlName="district"
                    [nzNotFoundContent]="'无法找到'"
                    nzShowSearch>
                    <nz-option
                      *ngFor="let option of regionOptions"
                      [nzLabel]="option.name"
                      [nzValue]="option.name">
                    </nz-option>
                  </nz-select>
                </div>
              </div>
            </div>
            <div nz-form-explain *ngIf="(getFormControl('district').dirty&&getFormControl('district').hasError('required')) ||
             (getFormControl('Province').dirty&&getFormControl('Province').hasError('required')) ||
             (getFormControl('City').dirty&&getFormControl('City').hasError('required'))">请选择企业地区</div>
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24"></div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24" [nzValidateStatus]="getFormControl('detail')">
            <nz-input nz-col [nzSpan]="24" formControlName="detail" [nzSize]="'large'" nzType="textarea" [nzAutosize]="{ minRows: 2 }"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('detail').dirty&&getFormControl('detail').hasError('required')">请输入详细地址</div>
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="9" [nzXs]="24">买家留言:</div>
          <div nz-form-control nz-col [nzSm]="6" [nzXs]="24" *ngIf="expressInfo">{{expressInfo.remark?expressInfo.remark:'无'}}</div>
        </div>
        <div nz-form-item nz-row style="margin-bottom:8px;">
          <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="9">
            <button nz-button [nzSize]="'large'" [nzType]="'primary'">保存</button>
          </div>
        </div>
      </form>
    </nz-spin>
  </div>
</div>
